Windows firewall Command Line 開例外清單Port Range
[Single Port]
開8080/TCP Port
C:\netsh firewall add portopening TCP 8080 "HTTP Port8080"
C:\netsh firewall delete portopening TCP 8080
[Port Range]
為FTP passive mode開5500/TCP到5700/TCP Port
C:\FOR /L %I IN (5500,1,5700) DO netsh firewall add portopening TCP %I "FTP Passive mode Port Range"%I
C:\FOR /L %I IN (5500,1,5700) DO netsh firewall delete portopening TCP %I
PS.若要將以上command寫在batch file請將%I都改成%%I才能執行
Brad Chen's Developer Blog Azure Database Data science Machine Learning Cloud
訂閱:
張貼留言 (Atom)
SQL Server Database Mirroring 資料庫鏡像
SQL Server Database Mirroring 資料庫鏡像
-
1.安裝了Oracle Client,就可以用Oracle Net Manager工具來設定TNS連線設定(Tnsnames.ora) Oracle Client 18.3 Installation 安裝Oracle Client 18.3 2.啟動Oracle Ne...
-
1.下載 Oracle Database 18c (18.3) https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle18c-windows-180000-5066774.ht...
-
ASP.NET MVC Web App啟用SSL (Https連線) 1.在Web專案屬性 (1)將SSL已啟用改為True (2)複製或記下SSL URL路徑 2.Web專案屬性視窗,將專案URL改成上一個步驟複製的SSL URL路徑 3.在需要使用Https的Contro...
2 則留言:
FOR /L %I IN (5500,1,5700) DO netsh firewall add portopening TCP %I "FTP Passive mode Port Range"%I
這句不能save 成BAT FILE
BAT 不能用FOR 嗎??
把%I都改成%%I就可以了
張貼留言